package springcloud.easybuy.controller;

import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import springcloud.easybuy.dao.NewsDao;
import springcloud.easybuy.entity.EasybuyNews;

import javax.annotation.Resource;
import java.util.List;

@Controller
    @RequestMapping("/news/provider")
@ResponseBody
public class NewsController {

    @Resource
    private NewsDao newsDao;
    @RequestMapping("/news/queryAll")
     public List<EasybuyNews> queryAll(){
         return newsDao.findAll();
     }
}
